﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sys.SqlServer.Smo
{
    public class Scriptlet
    {
        public Guid ID { get; set; }

        public string Name { get; set; }

        public ScriptType Type { get; set; }

        public ScriptObject Object { get; set; }

        public string Data { get; set; }

        public Scriptlet()
        {
            ID = Guid.NewGuid();
            Name = "Untitled";
            Type = ScriptType.Schema;
        }

        public Scriptlet(string name)
        {
            ID = Guid.NewGuid();
            Name = name;
            Type = ScriptType.Schema;
        }

        public Scriptlet(ScriptType type)
        {
            ID = Guid.NewGuid();
            Name = "Untitled";
            Type = type;
        }

        public Scriptlet(string name, ScriptType type)
        {
            ID = Guid.NewGuid();
            Name = name;
            Type = type;
        }

        public Scriptlet(string name, ScriptType type, ScriptObject obj)
        {
            ID = Guid.NewGuid();
            Name = name;
            Type = type;
            Object = obj;
        }
    }
}